#pragma once

#include "scr_resource.h"
#include "scr_rect.h"

struct SDL_Surface;
class SCRResourceManager;

namespace SCRTextureAlpha
{
	typedef int Enum;
	const Enum NONE = 0;
	const Enum HAS_ALPHA = 1;
}

class SCRTexture
	: public SCRResource
{
public:

	virtual ~SCRTexture();
	void Draw(const SCRRect& Dest, const SCRRect& Source);
	void Draw(const int& X, const int& Y, const SCRRect& Source);
	void Draw(const int& X, const int& Y);
	SDL_Surface* GetData() const;
	void Reload();

	friend class SCRResourceManager;

private:

	SCRTexture(const std::string& Filename, const SCRTextureAlpha::Enum& Alpha);

	SDL_Surface* m_pTexture;
};

inline SDL_Surface* SCRTexture::GetData() const
{
	return m_pTexture;
}
